\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fullpage}[1994/02/15 1.0 (PWD)]
\RequirePackage{ifthen}

\newlength{\FP@margin}
\DeclareOption{in}{\setlength{\FP@margin}{1in}}
\DeclareOption{cm}{\setlength{\FP@margin}{1.5cm}}

\newboolean{FP@plain}
\newboolean{FP@empty}
\DeclareOption{plain}{\setboolean{FP@plain}{true}
	\setboolean{FP@empty}{false}
	\pagestyle{plain}}
\DeclareOption{empty}{\setboolean{FP@plain}{true}
     \setboolean{FP@empty}{true}
	\pagestyle{empty}}
\DeclareOption{headings}{\setboolean{FP@plain}{false}
     \setboolean{FP@empty}{false}
	\pagestyle{headings}}
\DeclareOption{myheadings}{\setboolean{FP@plain}{false}
     \setboolean{FP@empty}{false}
	\pagestyle{myheadings}}
\ExecuteOptions{in,plain}
\ProcessOptions*

\ifthenelse{\boolean{FP@plain}}
	{\setlength{\headheight}{0pt} \setlength{\headsep}{0pt}}{}
\ifthenelse{\boolean{FP@empty}}
	{\setlength{\footskip}{0pt}}{}

\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2\FP@margin}
\setlength{\oddsidemargin}{\FP@margin}
\addtolength{\oddsidemargin}{-1in}
\setlength{\evensidemargin}{\oddsidemargin}

\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-\headheight}
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\footskip}
\addtolength{\textheight}{-2\FP@margin}
\setlength{\topmargin}{\FP@margin}
\addtolength{\topmargin}{-1in}

\addtolength{\textheight}{0in}
\addtolength{\footskip}{0in}

